--赤色之瞳
local chisezhitong = fk.CreateSkill {
    name = "mcdh_chisezhitong",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

chisezhitong:addEffect('active',{
    card_num = 0,
    target_num = 1,
    card_filter = function() return false end,
    target_filter = function(self, player,to_select, selected, selected_cards, card)
        return #selected == 0  and not to_select:isNude()
    end,
    can_use = function(self, player)
        return player:usedSkillTimes(self.name,Player.HistoryPhase) == 0
    end,
    on_use = function(self, room, effect)
        local target = effect.tos[1]
        local player =effect.from
        local cards =room:askForCardChosen(player, target, "he", self.name, "#chisezhitong:"..target.id)
        local card =Fk:getCardById(cards)
        room:throwCard(cards,self.name,target,player)
        if card.color == Card.Red then
            U.askForUseVirtualCard(room, player, "slash", nil, self.name, "#chisezhitong-use", true, true, true, true, nil, false)
        elseif  card.color == Card.Black then
            room:loseHp(player,1, self.name)
        end
    end
})

Fk:loadTranslationTable {
    ["mcdh_chisezhitong"] = "赤色之瞳",
    [":mcdh_chisezhitong"] = "出牌阶段限一次，你可以弃置一名角色一张牌。若此牌为红色，你可以视为使用一张无距离限制的【杀】；若为黑色，你失去1点体力。",
    ["#chisezhitong"] = "赤色之瞳:弃置 %src 一张牌",
    ["#chisezhitong-use"] = "赤色之瞳:视为使用一张无距离限制的【杀】",
}

return chisezhitong